Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BLS signature support #1659

Closed
wants to merge 22 commits into from
Closed

Add BLS signature support #1659

wants to merge 22 commits into from

Conversation

lrubasze
Copy link
Contributor

@lrubasze lrubasze commented Dec 1, 2023

Summary

This PR adds support for BLS signatures.
It also implements CryptoUtils native package, which allows to perform some cryptographic operations natively.

Details

BLS details:

  • Algorithm: BLS12-381
  • Public key size: 48 bytes (G1)
  • Signature size 96 bytes (G2)

CryptoUtils functions:

  • keccak_hash() - generate Keccak-256 hash of the given message
    ATM it Keccak-256 is faked by Blake2b, it shall be changed soon
  • bls_verify() - do the given BLS signature verification of the given message hash using given public key

In order to get it working I had to move cryptographic primitives (PrivateKey, Signature definitions) from transaction to radix-engine-common. What is left in transaction are the Radix Engine cryptographics, eg. IntentSignatureV1 , NotarySignatureV1.

TODO: Costing

Testing

  • Test CryptoUtils package using test_runner
  • Test CryptoUtils package using CryptoScrypto test blueprint

Update Recommendations

For dApp Developers

CryptoUtils package might be used to delegate cryptographic operations to the native layer.
NOTE!
CryptoUtils package must be published before (it is not being published during bootstrap as other native packages)

@lrubasze lrubasze changed the title Add BLS signature support v Add BLS signature support Dec 1, 2023
@lrubasze lrubasze closed this Dec 4, 2023
@lrubasze lrubasze deleted the feature/bls_signatures branch December 4, 2023 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant